package com.cssnj.portal.web.query;

import com.cssnj.portal.domain.common.UserInfo;
import com.cssnj.portal.service.query.Query07Service;
import io.predictech.framework.domain.common.JsonRequest;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author Arthur
 * @description 新办纳税人户数 企业户数、个体户数、非企业单位户数	分地区柱状图
 * @since 2018-10-16 16:33
 **/
@Controller
@RequestMapping("/query/query07")
public class Query07Controler {

    @Autowired
    Query07Service query07Service;

    @RequestMapping({"/init.do"})
    public ModelAndView init(@ModelAttribute JsonRequest jsonRequest) {
        ModelAndView modelAndView = new ModelAndView("query/query07");
        UserInfo userInfo = (UserInfo) SecurityUtils.getSubject().getPrincipal();
        jsonRequest.getReqData().put("userInfo", userInfo);
        modelAndView.addAllObjects(query07Service.init(jsonRequest).getRepData());
        return modelAndView;
    }
}
